import { memo } from "react";

import { RoomListWrapper } from "./style";
import { RoomItem } from "../../views/home/cnps/room";

export const RoomList = memo(
    (props) => {
        const { RoomList = [],itemwidth = "25"} = props;
        return (
            <RoomListWrapper>
                   {RoomList?.slice(0,8).map((item) => {
                        return (<RoomItem itemData={item} itemwidth={itemwidth} key={item.id}></RoomItem>)
                    })}
            </RoomListWrapper>
        )
    }
)